package com.tdcoding.chat.dbase.mapper;

import java.util.List;

import com.tdcoding.chat.entities.GroupInfo;
import com.tdcoding.chat.entities.MemberInfo;

public interface GroupMapper {
	int createGroup(GroupInfo groupInfo);

	GroupInfo queryGroupInfo(long userId, long groupId);

	List<GroupInfo> queryGroupList(long userId, int groupType);

	List<GroupInfo> queryGroupByKeyword(long userId, String keyword, int groupType, int pageIndex, int pageCount);
	
	MemberInfo queryMemberInfo(long userId, long memberId, long groupId);

	List<MemberInfo> queryMemberList(long groupId);

	List<MemberInfo> queryAdministrators(long groupId);

	int addMember(MemberInfo memberInfo);

	int kickoutMember(long groupId, long memberId);

	int updateGroupLogo(long groupId, String groupLogo);

	int updateGroupInfo(String set, String where);

	int updateMemberInfo(String set, String where);

	int isGroupMember(long groupId, long memberId);

	int allowJoinGroup(long groupId);

	int transferGroup(long groupId,long belongId,String belongName);
	
	int dissolveGroup(long groupId);
}
